package com.linln.admin.SpringBoot.service.impl;

import com.linln.admin.SpringBoot.domain.TeamApply;
import com.linln.admin.SpringBoot.repository.StuTeamRepository;
import com.linln.admin.SpringBoot.service.StuTeamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StuTeamServiceImpl implements StuTeamService{
    @Autowired
    private StuTeamRepository stuTeamRepository;
    @Override
    public void deleteStuTeam(TeamApply teamApply) {
        int stuId = Integer.parseInt(teamApply.getStu_id());
        int teamId = Integer.parseInt(teamApply.getTeam_id());
        stuTeamRepository.deleteByStuIdAndTeamId(stuId,teamId);

    }
}
